<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="AddClaims_OLD.aspx.cs" Inherits="Claims_Claims" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <asp:UpdatePanel ID="UpdatePanelClaims" runat="server">
    <ContentTemplate>
    
        <div id="mainContainer" style="width:1000px">
        
            <div id="left">
              
            <div id="formClaims" style="width:350px; background-color:#A0A0A0;"> 
                
                <div style="padding:10px 0 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Customer:
                    </span>
                    <div style="float:right">
                        <telerik:RadComboBox ID="RadComboBoxCustomers" runat="server" 
                            DataSourceID="LinqDataSourceCustomers" DataTextField="Name" 
                            DataValueField="CustomerID" Text="�������� ������" EnableLoadOnDemand="true">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </telerik:RadComboBox>
                    </div>
                    <div style="float:right">
                        <asp:CompareValidator ValueToCompare="�������� ������" Operator="NotEqual" 
                        ControlToValidate="RadComboBoxCustomers" Text="*" runat="server" ID="Comparevalidator1" />
                    </div>
                </div>
                <br />
                
                <div style="padding:4px 0 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Supplier:
                    </span>   
                    <div style="float:right"> 
                        <telerik:RadComboBox ID="RadComboBoxSuppliers" runat="server" 
                            DataSourceID="LinqDataSourceSuppliers" DataTextField="Name" 
                            DataValueField="SupplierID" Text="�������� ���������" EnableLoadOnDemand="true">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </telerik:RadComboBox>
                    </div>
                    <div style="float:right">
                        <asp:CompareValidator ValueToCompare="�������� ���������" Operator="NotEqual" 
                        ControlToValidate="RadComboBoxSuppliers" Text="*" runat="server" ID="Comparevalidator2" />
                    </div>
                </div>
                <br />
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Dely Note:
                    </span>
                    <div style="float:right">
                        <telerik:RadTextBox ID="RadTextBoxDailyNote" runat="server" Skin="Default"/>
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadTextBoxDailyNote"/>
                    </div>
                </div>
                <br />
                
                <div style="padding:4px 9px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Arrival Date:
                    </span>
                    <div style="float:right">
                        <telerik:RadDatePicker ID="RadDatePickerArrivalDate" runat="server" 
                            Culture="English (United Kingdom)">
                            <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                ViewSelectorText="x">
                            </Calendar>
                            <DatePopupButton HoverImageUrl="" ImageUrl="" />
                        </telerik:RadDatePicker>
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadDatePickerArrivalDate"/>
                    </div>
                </div>
                <br />
                
                <div style="padding:10px 0 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        RequestedAction:
                    </span>
                    <div style="float:right">
                        <telerik:RadComboBox ID="RadComboBoxReqAction" runat="server" 
                            DataSourceID="LinqDataSourceRequestedAction" DataTextField="Text" 
                            DataValueField="RequestedActionId">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </telerik:RadComboBox>
                    </div>
                </div>
                <br />
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                    Other Action:
                    </span>
                    <div style="float:right">               
                        <telerik:RadTextBox ID="RadTextBoxOtherAction" runat="server" Skin="Default"/>                      
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadTextBoxOtherAction"/>
                    </div>    
                </div>                               
                <br />
                
                <span>
                <hr />
                Claim Note
                <hr />
                </span>
                            
                <div style="padding:4px 9px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Date:
                    </span>
                    <div style="float:right">
                        <telerik:RadDatePicker ID="RadDatePickerClaimNote" runat="server" 
                            Culture="English (United Kingdom)">
                            <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                ViewSelectorText="x">
                            </Calendar>
                            <DatePopupButton HoverImageUrl="" ImageUrl="" />
                        </telerik:RadDatePicker>
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadDatePickerClaimNote"/>
                    </div>    
                    
                </div>
                <br />
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                    Claim number:
                    </span>
                    <div style="float:right">
                        <telerik:RadTextBox ID="RadTextBoxClaimNum" runat="server" Skin="Default"/>
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadTextBoxClaimNum"/>
                    </div>  
                </div>
                <br />
                 
                 
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                    Supplier:
                    </span>
                    <div style="float:right">
                        <telerik:RadTextBox ID="RadTextBoxSupplier" runat="server" Skin="Default"/>
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadTextBoxSupplier"/>
                    </div>  
                </div>
                <br />
                             
                <div style="padding:4px 0 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Reference:
                    </span>
                    <div style="float:right">
                        <telerik:RadComboBox ID="RadComboBoxReference" runat="server"                           
                            DataSourceID="LinqDataSourceReferences" DataTextField="ReferenceName" 
                            DataValueField="ReferenceId" Text="Select reference" EnableLoadOnDemand="true">
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </telerik:RadComboBox>
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadComboBoxReference"/>
                    </div>  
                </div>
                <br />
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                    Order number:
                    </span>
                    <div style="float:right">
                        <telerik:RadTextBox ID="RadTextBoxOrderNum" runat="server" Skin="Default"/>
                    </div>
                    <div style="float:right">
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                        ErrorMessage="RequiredFieldValidator" Text="*" ControlToValidate="RadTextBoxOrderNum"/>
                    </div> 
                </div>
                <br />
                
            </div>
        
        </div>  
        
            <div id="separator" style="float:left; width:100px">
        &nbsp;
        </div>
               
            <div id="right" style="float:left; font-family:Arial; font-weight:lighter; font-size:medium; color:Black;">
        
            <div id="formItems" style="float:left; background-color:#A0A0A0; width:500px">
                                         
                <div style="padding:10px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Item code:
                    </span>
                    <div style="float:right">
                        <telerik:RadTextBox ID="RadTextBoxItemCode" runat="server" Columns="28" 
                            ontextchanged="RadTextBoxItemCode_TextChanged" AutoPostBack="True"/>
                    </div>
                </div>
                <br />
                
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px; ">
                    <span style="float:left">
                        ������������:
                    </span>
                    <div style="float:right">
                        <telerik:RadTextBox ID="RadTextBoxItemName" runat="server" Columns="28" />                        
                    </div>
                </div>
                <br />
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px; height:50px;">
                    <span style="float:left">
                        ��������:
                        <%--<asp:UpdateProgress ID="UpdateProgress2" runat="server">
                            <ProgressTemplate>
                                &nbsp;&nbsp;<span style="color:Red; font-weight:bold">���������...</span>
                            </ProgressTemplate>
                        </asp:UpdateProgress>--%>
                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px"
                            Width="75px">
                        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
                            style="border: 0px;" />
                        </telerik:RadAjaxLoadingPanel>
                    </span>
                    <div style="float:right">
                        <telerik:RadTextBox ID="RadTextBoxDescription" runat="server" Columns="50" 
                            Rows="4" TextMode="MultiLine"  />
                    </div>
                </div>
                <br />
                <hr />
                               
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        ReceivedQuantity:
                    </span>
                    <div style="float:right">
                        <telerik:RadNumericTextBox ID="RadNumericReceivedQuantity" 
                            runat="server" Culture="Bulgarian (Bulgaria)" 
                            Width="125px" DataType="System.Int32" />
                    </div>
                </div>
                <br />
                
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                         ApprovedQuantity
                    </span>
                    <div style="float:right">
                        <telerik:RadNumericTextBox ID="RadNumericApprovedQuantity" 
                            runat="server" Culture="Bulgarian (Bulgaria)" 
                            Width="125px" DataType="System.Int32" />
                    </div>
                </div>
                <br />
                
               
                 <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                         RejectedQuantity
                    </span>
                    <div style="float:right">
                        <telerik:RadNumericTextBox ID="RadNumericRejectedQuantity" 
                            runat="server" Culture="Bulgarian (Bulgaria)" 
                            Width="125px" DataType="System.Int32" />
                    </div>
                </div>
                <br />
                
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                         ExtraWork
                    </span>
                    <div style="float:right">
                        <telerik:RadNumericTextBox ID="RadNumericExtraWork" 
                            runat="server" Culture="Bulgarian (Bulgaria)" 
                            Width="125px" DataType="System.Decimal" />
                    </div>
                </div>
                <br />
                
                <div style="padding:4px 0 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                        Status:
                    </span>
                    <div style="float:right">
                        <telerik:RadComboBox ID="RadComboBoxStatus" runat="server" 
                            DataSourceID="Status" DataTextField="status1" DataValueField="id">                           
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </telerik:RadComboBox>
                        
                    </div>
                </div>
                <br />
                
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                         Price
                    </span>
                    <div style="float:right">
                        <telerik:RadNumericTextBox ID="RadNumericPrice" 
                            runat="server" Culture="Bulgarian (Bulgaria)" 
                             Width="125px" DataType="System.Decimal" />
                    </div>
                </div>
                <br />
                             
                <div style="padding:4px 30px 4px 4px; margin:0 5px 5px 5px;">
                    <span style="float:left">
                         QualityInspCost
                    </span>
                    <div style="float:right">
                        <telerik:RadNumericTextBox ID="RadNumericQualityInspCost" 
                            runat="server" Culture="Bulgarian (Bulgaria)" 
                            Width="125px" DataType="System.Decimal" />
                    </div>
                </div>
                <br />
                            
                <hr /> 
                
                    <div id="linkButton" style="margin-left:10px;">
                        <asp:LinkButton ID="LinkButtonAdd" runat="server" onclick="LinkButtonAdd_Click"
                            Text="�������� �� ������" ForeColor="Black">
                        </asp:LinkButton>
                    </div> 
                         
                </div>
             
            <div style="clear:left; float:left; height:50px">
                &nbsp;
            </div>
                           
        </div>
        
            <div id="grid" style="clear:left; float:left;">       
                <telerik:RadGrid ID="RadGridSelectedItems" runat="server" 
                    AutoGenerateDeleteColumn="True" GridLines="None" 
                    oncolumncreated="RadGridSelectedItems_ColumnCreated" 
                    ondeletecommand="RadGridSelectedItems_DeleteCommand">
                    <HeaderContextMenu EnableTheming="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </HeaderContextMenu>
                    <MasterTableView>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                    </MasterTableView>
                    <FilterMenu EnableTheming="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </FilterMenu>
                </telerik:RadGrid>                           
        </div> 
        
            <div id="bottomSeparator" style="height:20px; clear:left; float:left;">
                &nbsp;
            </div>
        
            <div id="bottomButtons" style="clear:left; float:left">
                &nbsp;&nbsp;
                <asp:LinkButton ID="LinkButtonAddToDb" ForeColor="Black" runat="server" 
                    onclick="LinkButtonAddToDb_Click">add</asp:LinkButton>
                &nbsp;&nbsp;
                <asp:LinkButton ID="LinkButtonCancel" ForeColor="Black" runat="server">cancel</asp:LinkButton>
                &nbsp;&nbsp;
                <asp:LinkButton ID="LinkButtonPrintBG" ForeColor="Black" runat="server" 
                    >printbg</asp:LinkButton>
                &nbsp;&nbsp;
                <asp:LinkButton ID="LinkButtonPrintEN" ForeColor="Black" runat="server" 
                    onclick="LinkButtonPrintEN_Click">printen</asp:LinkButton>
                
            </div>
                                    
        </div>
    
    <asp:LinqDataSource ID="LinqDataSourceCustomers" runat="server" 
            ContextTypeName="ItemsDataContext" Select="new (Name, CustomerID)" 
            TableName="Customers">
        </asp:LinqDataSource>
             
    <asp:LinqDataSource ID="LinqDataSourceSuppliers" runat="server" 
                ContextTypeName="ItemsDataContext" Select="new (Name, SupplierID)" 
                TableName="Suppliers">
        </asp:LinqDataSource>
        
    <asp:LinqDataSource ID="LinqDataSourceClaims" runat="server" 
            ContextTypeName="ItemsDataContext" EnableInsert="True" TableName="Claims">
        </asp:LinqDataSource>
             
    <asp:LinqDataSource ID="LinqDataSourceReferences" runat="server" 
            ContextTypeName="ItemsDataContext" Select="new (ReferenceId, ReferenceName)" 
            TableName="References">
        </asp:LinqDataSource>
    
    
    <asp:LinqDataSource ID="LinqDataSourceRequestedAction" runat="server" 
            ContextTypeName="ItemsDataContext" Select="new (RequestedActionId, Text)" 
            TableName="RequestedActions">
    </asp:LinqDataSource>
    
    <asp:LinqDataSource ID="Status" runat="server" 
                            ContextTypeName="ItemsDataContext" Select="new (status1, id)" 
                            TableName="Status">
                        </asp:LinqDataSource>
       
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

